package com.whccb.apps.office.document.event;

import java.util.Map;

import com.actionsoft.bpms.bpmn.engine.core.delegate.ProcessExecutionContext;
import com.actionsoft.bpms.bpmn.engine.listener.ExecuteListener;
import com.actionsoft.bpms.bpmn.engine.listener.ListenerConst;

public class ShowLssueManAfterFormLoadEvent extends ExecuteListener {

	public String getDescription() {
		return "公文发文流程，根据流程显示更新签发人。";
	}

	public String getProvider() {
		return "ActionSoft";
	}

	public String getVersion() {
		return "AWS 6.0";
	}

	public void execute(ProcessExecutionContext param) throws Exception {
		Map<String, Object> macroLibraries = param
				.getParameterOfMap(ListenerConst.FORM_EVENT_PARAM_TAGS);
		if (macroLibraries.get("LSSUEMAN") != null) {
			String lssueman = "<input type='text'  READONLY class='txt'  readonly='readonly'  placeholder='' name='LSSUEMAN' id='LSSUEMAN'  value='"
					+ param.getUserContext().getUserName() + "' >";
			String lssuemanid = "<input type='text'  READONLY class='txt'  readonly='readonly'  placeholder='' name='LSSUEMANID' id='LSSUEMANID'  value='"
					+ param.getUserContext().getUID() + "' >";
			macroLibraries.put("LSSUEMAN", lssueman);
			macroLibraries.put("LSSUEMANID", lssuemanid);
		}

	}
}
